package org.witsoft.demo.graphql.service.impl;

import org.springframework.stereotype.Service;
import org.witsoft.demo.graphql.service.AuthenticationService;

import java.util.HashSet;
import java.util.Set;

@Service
public class AuthenticationServiceImpl implements AuthenticationService {

    @Override
    public Set<String> getAuthorizes(String authorization) {
        Set authorizes =  new HashSet<>();
        authorizes.add("Guest");
        if(authorization.contains("admin")) {
            authorizes.add("Admin");
        }
        return authorizes;
    }
}
